#ifndef __LOADMODEL_H__
#define __LOADMODEL_H__

#include "myFramework.h"
#include <CG/cg.h>
#include <CG/cgGL.h>

using namespace RayFrame;

class CGDemo: public NATIVE_APP
{
public:
  CGDemo();

  virtual void Update(double timeElapsed){};
  virtual void Render(double timeElapsed);
  virtual void Render2D(double timeElapsed);

  virtual bool OnKey(unsigned key, bool down);
  virtual void OnClose();
  virtual void InitApp();
protected:
  void checkError();
  void loadShaders();

  ShaderProgram* m_cgProgram;
  CGprofile m_profile;
  CGcontext m_context;
  CGprogram m_shaderProgram;
  CGparameter m_paramMvp;
};

#endif
